<?php
/**
 * Dependency links with min weight filter
 *
 * PHP version 5
 *
 * @category  W
 * @package   Services
 * @author    Olivier Hoareau <olivier@phppro.fr>
 * @copyright 2009 PHPPRO http://www.phppro.fr
 * @license   http://dev.phppro.fr/license PHPPRO
 * @version   SVN: $Id:$
 * @link      http://dev.phppro.fr/projects/wdependency
 */
require_once 'W/Dependency/Filter/Link/Abstract.php';
/**
 * Dependency linked to filter
 *
 * @category  W
 * @package   Services
 * @author    Olivier Hoareau <olivier@phppro.fr>
 * @copyright 2009 PHPPRO http://www.phppro.fr
 * @license   http://dev.phppro.fr/license PHPPRO
 * @version   SVN: $Id$
 * @link      http://dev.phppro.fr/projects/wdependency
 */
class W_Dependency_Filter_LinksWithMinWeight extends W_Dependency_Filter_Link_Abstract
{
    private $weight;
    public function setWeight($value)
    {
        $this->weight = $value;
        return $this;
    }
    public function isValidLink($node,$subNode,$weight,$data)
    {
        return $this->weight <= $weight;
    }
}